<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/20 0020
 * Time: 13:30
 */
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
class InterfaceController extends Controller{
    public function info(){
        $student=DB::select('select * from student');
        if(!empty($student)){
            $data['msg']='有内容';
            $data['code']=1;
            $data['data']=$student;
            return json_encode($data);
        }else{
            $data['msg']='无内容';
            $data['code']=0;
            return json_encode($data);
        }
    }
}